package com.xius.controller;
import com.xius.common.ApiController;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
import com.github.xiaoymin.knife4j.annotations.DynamicParameters;
import com.xius.common.R;
import com.xius.service.SecRolePermissionService;
import com.github.pagehelper.PageHelper;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/*
* *
* @author makejava
* @since 2020-06-12 17:14:18
*/
@RestController@RequestMapping("/api/secRolePermission")public class SecRolePermissionController extends ApiController {
    
    /*
    *     * 服务对象
    */
    @Resource    private SecRolePermissionService secRolePermissionService;
    @PostMapping("/queryAll")    @ApiOperationSupport(params = @DynamicParameters(                name = "SecRolePermissionControllerQueryAll",                properties = {
    @DynamicParameter(name = "secRolePermissionId", value = ""),@DynamicParameter(name = "secRolePermissionRoleId", value = "角色主键"),@DynamicParameter(name = "secRolePermissionPermissionId", value = "权限主键"),    }
    ))    public R queryAll(@RequestBody Map<String,Object> map) {
        return success(secRolePermissionService.queryAll(map));
    }
    @PostMapping("/queryAllJoin")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecRolePermissionControllerQueryAllJoin",                    properties = {
    @DynamicParameter(name = "secRolePermissionId", value = ""),@DynamicParameter(name = "secRolePermissionRoleId", value = "角色主键"),@DynamicParameter(name = "secRolePermissionPermissionId", value = "权限主键"),    }
    ))    public R queryAllJoin(@RequestBody Map<String,Object> map) {
        return success(secRolePermissionService.queryAllJoin(map));
    }
    @PostMapping("/queryById")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecRolePermissionControllerQueryById",                    properties = {
    @DynamicParameter(name = "secRolePermissionId", value = ""),@DynamicParameter(name = "secRolePermissionRoleId", value = "角色主键"),@DynamicParameter(name = "secRolePermissionPermissionId", value = "权限主键"),    }
    ))    public R queryById(@RequestBody Map<String,Object> map) {
        return success(secRolePermissionService.queryById(map));
    }
    @PostMapping("/insert")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecRolePermissionControllerInsert",                    properties = {
    @DynamicParameter(name = "secRolePermissionId", value = ""),@DynamicParameter(name = "secRolePermissionRoleId", value = "角色主键"),@DynamicParameter(name = "secRolePermissionPermissionId", value = "权限主键"),    }
    ))    public R insert(@RequestBody Map<String,Object> map) {
        return success(this.secRolePermissionService.insert(map));
    }
    @PostMapping("/inserts")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecRolePermissionControllerInserts",                    properties = {
    @DynamicParameter(name = "secRolePermissionId", value = ""),@DynamicParameter(name = "secRolePermissionRoleId", value = "角色主键"),@DynamicParameter(name = "secRolePermissionPermissionId", value = "权限主键"),    }
    ))    public R inserts(@RequestBody List<Map<String,Object>> list) {
        return success(this.secRolePermissionService.inserts(list));
    }
    @PostMapping("/update")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecRolePermissionControllerUpdate",                    properties = {
    @DynamicParameter(name = "secRolePermissionId", value = ""),@DynamicParameter(name = "secRolePermissionRoleId", value = "角色主键"),@DynamicParameter(name = "secRolePermissionPermissionId", value = "权限主键"),    }
    ))    public R update(@RequestBody Map<String,Object> map) {
        return success(this.secRolePermissionService.update(map));
    }
    @PostMapping("/deleteByIds")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecRolePermissionControllerDeleteByIds",                    properties = {
    }
    ))    public R deleteByIds(@RequestBody Map<String,Object> map) {
        return success(this.secRolePermissionService.deleteByIds(map));
    }
    @PostMapping("/deleteById")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecRolePermissionControllerDeleteById",                    properties = {
    }
    ))    public R deleteById(@RequestBody Map<String,Object> map) {
        return success(this.secRolePermissionService.deleteById(map));
    }
}
